<?php
/**
 * Created by PhpStorm.
 * User: 张辉
 * Date: 2018/9/17
 * Time: 14:20
 */

/**
 * Class JPushService 极光推送
 */
namespace app\common\service;
use app\common\library\CommonFun;

class JPushService
{
    /**
     * @var \JPush\PushPayload
     */
    public $push;

    /**
     * @var \JPush\Client
     */
    public $client;

    public function __construct()
    {
        CommonFun::get_other_config("JPushConfig",2);
        $JPushConfig = config("JPush");
        $this->client = new \JPush\Client( $JPushConfig['AppKey'], $JPushConfig['MasterSecret'] );
        $this->push = $this->client->push();
    }

}